class TextContext(object):
    def __init_(self):
        print 'i am __init__()'
        
    def __enter__(self):
        print 'i am __enter__'
        
    def __exit__(self, *args):
        print 'i am __exit__'
        

if __name__ == '__main__':
    with TextContext() as t:
        print 'i am real content!'
        print 2/0
    